File transmission/reception device and control method of file transmission/reception device

ABSTRACT

According to one embodiment, a file transmission/reception device includes a communication direction managing unit and an application unit. The communication direction managing unit, in near field communication, cuts off a connection with an opposing device in a case where a conflict occurs with the opposing device, and, after being reconnected to the opposing device, switches the file transmission/reception device to any one mode of a master mode and a slave mode. The application unit performs transmission, reception, or transmission/reception of a file between the opposing device and the file transmission/reception device in the master mode or the slave mode in accordance with a mode specified by the communication direction managing unit.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.15/123,999, filed Sep. 6, 2016, which the national stage ofPCT/JP2015/058393, filed Mar. 13, 2015, which is based upon and claimsthe benefit of priority from Japanese Patent Application No.2014-050845, filed on Mar. 13, 2014; the entire contents of which areincorporated herein by reference.

FIELD

Embodiments described herein relate generally to a filetransmission/reception device and a control method of filetransmission/reception device.

BACKGROUND

Conventionally, in a case where data transmission is performed throughnear field communication, generally, a processing request is issued froma master device to a slave device. In TransferJet (trademark) that isone of near field communication technologies, priority levels of devicesare determined based on modes at the time of waiting for a connection.When a device waiting as a master is connected to a device waiting as aslave, a connection can be established between the master device havinga high priority level and the slave device having a low priority level.In addition, a device having a dynamic mode at the time of connectionwaiting determines a priority level of the device in accordance with apartner device such that the device has a low priority level in a casewhere the partner device is a master, and the device has a high prioritylevel in a case where the partner device is a slave.

However, in the conventional technology, in a case where master deviceseach having a file transmission request or dynamic devices approach eachother, a determination of which one is a high-priority device cannot bemade, a connection cannot be established, and a conflict occurs.Accordingly, a communication function using an OBEX (Object Exchange)protocol or the like cannot be operated between devices having the samemode.

CITATION LIST Patent Literature

[PTL 1] Japanese Patent Application Laid-open No. 2011-91762

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram that illustrates an example of the configuration ofa communication device according to a first embodiment;

FIG. 2 is a diagram that illustrates a hierarchical model ofTransferJet;

FIG. 3 is a flowchart that illustrates a file transmission/receptionprocess according to the first embodiment;

FIG. 4 is a diagram that illustrates an example of the configuration ofa data frame of TransferJet;

FIG. 5 is a flowchart that illustrates a bidirectional communicationprocess according to the first embodiment;

FIG. 6 is a sequence diagram that illustrates a filetransmission/reception process between devices A and B;

FIG. 7 is a diagram that illustrates mode transitions of each device;

FIG. 8 is a diagram that illustrates an example of a display of acommunication state in a communication device;

FIG. 9 is a diagram that illustrates an example of a display aftercompletion of bidirectional communication in a communication device;

FIG. 10 is a flowchart that illustrates a bidirectional communicationprocess according to a second embodiment;

FIG. 11 is a flowchart that illustrates a unidirectional communicationprocess according to a third embodiment;

FIG. 12 is a diagram that illustrates mode transitions of each device;

FIG. 13 is a diagram that illustrates an example of a display aftercompletion of unidirectional communication in a communication device;

FIG. 14 is a diagram that illustrates an example of the configurationsof a communication device and a host device according to a fourthembodiment;

FIG. 15 is a diagram that illustrates an example of the configuration ofdevices and a connection partner management table according to thefourth embodiment;

FIG. 16 is a diagram that illustrates an example of the configuration ofdevices and a transmission list table according to the fourthembodiment;

FIG. 17 is a diagram that illustrates an example of a display aftercompletion of bidirectional communication in a communication device;

FIG. 18 is a diagram that illustrates an example of the configuration ofdevices and a connection partner management table according to a fifthembodiment;

FIG. 19 is a diagram that illustrates an example of the configuration ofdevices and a transmission list table according to the fifth embodiment;

FIG. 20 is a diagram that illustrates a basic difference transmissionmethod;

FIG. 21 is a diagram that illustrates an example of the configuration ofa communication device according to a sixth embodiment;

FIG. 22 is a diagram that illustrates an example of the configuration ofa difference transmission control unit according to the sixthembodiment;

FIG. 23 is a diagram that illustrates a file transmission relation witha device A being considered as the center;

FIG. 24 is a diagram that illustrates an example of the configuration ofa transmission history list of a transmission history storing unit ofthe device A;

FIG. 25 is a diagram that illustrates an example of the configuration ofa transmission history list of a transmission history storing unit of adevice B;

FIG. 26 is a flowchart that illustrates a file transmission processaccording to the sixth embodiment;

FIG. 27 is a diagram that illustrates information that is transmittedand received between a transmission device and a reception device;

FIG. 28 is a diagram that illustrates an example of the configuration ofa transmission history list of a low level;

FIG. 29 is a flowchart that illustrates a file transmission processaccording to a seventh embodiment;

FIG. 30 is a diagram that illustrates a process of searching for filesthat have not been transmitted;

FIG. 31 is a diagram that illustrates transitions of a file list and atransmission history list of each device;

FIG. 32 is a diagram that illustrates an example of the configuration ofa file (j) that is interrupted in the middle of a transmission process;

FIG. 33 is a diagram that illustrates an example of the configuration ofa communication device and a host device according to a ninthembodiment;

FIG. 34 is a diagram that illustrates an example of the configuration ofa difference transmission control unit according to the ninthembodiment;

FIG. 35 is a simplified diagram of the configuration of a communicationdevice;

FIG. 36 is a simplified diagram of the configuration of a communicationdevice and a host device;

FIG. 37 is a simplified diagram of the configuration of a communicationdevice and a host device;

FIG. 38 is a diagram that illustrates register use states of acommunication device and a host device; and

FIG. 39 is a diagram that illustrates an example of the configuration ofa register map.

DETAILED DESCRIPTION

In general, according to one embodiment, a file transmission/receptiondevice includes a communication direction managing unit and anapplication unit. The communication direction managing unit, in nearfield communication, cuts off a connection with an opposing device in acase where a conflict occurs with the opposing device, and, after beingreconnected to the opposing device, switches the filetransmission/reception device to any one mode of a master mode and aslave mode. The application unit performs transmission, reception, ortransmission/reception of a file between the opposing device and thefile transmission/reception device in the master mode or the slave modein accordance with a mode specified by the communication directionmanaging unit.

Exemplary embodiments of a file transmission/reception device and a filetransmission/reception method will be described below in detail withreference to the accompanying drawings. The present invention is notlimited to the following embodiments.

First Embodiment

FIG. 1 is a diagram that illustrates an example of the configuration ofa communication device 1 according to this embodiment. The communicationdevice 1 that is a file transmission/reception device includes: a userI/F unit 10; an application unit 11; a communication direction managingunit 12; a transmission condition information managing unit 13; acommunication control unit 14; a connection partner management table 15;and a transmission list table 16.

The user I/F unit 10 serves as an interface with user's processes suchas start of communication, registration of a user name, an input of theconnection partner management table 15, and category classification oftransmission data.

The application unit 11 executes a master process and a slave processand performs management and the like of the overall operations such asfile transmission and file reception.

The communication direction managing unit 12, in a case where a deviceto which it belongs and an opposing device have the same mode so as tocause a conflict, performs a comparison of unique IDs (UIDs), generationof a random number, and the like and determines a mode (the master orthe slave) of the device to which it belongs. After the completion ofunidirectional communication (one mode) is completed, the communicationdirection managing unit 12 switches the mode of the device to which itbelongs from the master to the slave or from the slave to the master.

The transmission condition information managing unit 13 acquires andmanages transmission condition information of the opposing device afterestablishment of a connection and determines a target file to betransmitted or received.

The communication control unit 14 performs transmission/reception of adata frame such as a connection request, a connection response, or acut-off request.

The connection partner management table 15 is a table used forregistering information of an opposing device, which is a connectionpartner, input by a user.

The transmission list table 16 is a table used for registering a file tobe transmitted at the time of being connected to the opposing device anda category to which the file belongs.

In this embodiment, as an example of a case where data communication isperformed using near field communication, a case will be described inwhich the communication device 1 transmits/receives a file to/from anopposing device using TransferJet (trademark). While, in TransferJet,there are modes of master, dynamic, and slave, in description presentedhereinafter, the master and the slave will be used, and it is assumedthat the master has high priority, and the slave has low priority. Here,a hierarchical model of TransferJet will be described in a simplemanner. FIG. 2 is a diagram that illustrates the hierarchical model ofTransferJet. It illustrates the appearance of an occurrence of aconflict when devices A and B, which are communication devices 1, areconnected. When largely divided, the hierarchical model of TransferJetcan be divided into three layers of an application layer, a sessionlayer, and a data link layer.

When a connection as a master is requested from the application layer, aconnection request data frame is transmitted in the data link layer. Inthe data link layer, in a case where the mode of the correspondingdevice is either the master or the slave, a data frame transmitted froma partner device can be received. However, when devices of the masterhaving the same priority level mutually receive connection request dataframes, a conflict is recognized in the session layer, and accordingly,a connection cannot be correctly made. In this way, in the applicationlayer, in a case where a device requests a connection as a master andapproaches the other master, a conflict notification is received, andprotocol communication cannot be performed. In addition, in the sessionlayer, in a case where masters mutually receive connection requests, aconflict state is formed, and accordingly, a connection cannot becorrectly established. In addition, in the data link layer, even whenthe upper layer is in the conflict state, devices can transmit andreceive data frames thereof.

Subsequently, in the communication device 1, in a case where a conflictoccurs at the time of connecting with the communication device 1 that isan opposing device, an operation of bidirectional communication forresolving the conflict and performing file transmission/reception willbe described. A device A (UID: 0x22222222) and a device B (UID:0x11111111) that are communication devices 1 are assumed to be in themaster mode (or the dynamic mode) together so as to be in a connectionwaiting state as an initial state, and both devices are assumed to be inthe state of transmitting a connection request data frame.

FIG. 3 is a flowchart that illustrates a file transmission/receptionprocess according to this embodiment. By switching the modes of devicesin the following sequence represented in the flowchart, the devicessequentially become a master and a slave and can transmit desired files.Here, the opposing device of the device A is the device B, and theopposing device of the device B is the device A.

First, in each of the devices A and B, when a user starts communication,the application unit 11 starts a connection by setting the mode of thedevice to which it belongs as a master, and the communication controlunit 14 starts to transmit a connection request data frame (Step S101).The communication control unit 14 continuously transmits a connectionrequest data frame on a regular basis (Step S101) while a connectionrequest data frame transmitted by an opposing device is not received, inother words, while the opposing device is not detected (No in StepS102).

Next, the devices A and B approach each other. In each of the devices Aand B, when a connection request data frame transmitted by an opposingdevice is received, in other words, when an opposing device is detected(Yes in Step S102), the communication control unit 14 analyzes thecontent of the received connection request data frame. Since a prioritylevel of the device that is the request issuance source is written inthe connection request data frame, the communication control unit 14compares the priority level with a priority level of the device to whichit belongs (Step S103).

In a case where the priority level of the above-described device and thepriority level of the opposing device are different from each other, inother words, in a case where one device is a master, and the otherdevice is a slave, a case where one device is a master, and the otherdevice is a dynamic, or the like (No in Step S103), a device having alower priority level establishes a connection by returning a connectionresponse data frame. For example, in a case where the device A is amaster, and the device B is a slave, a connection response data frame isreturned from the device B to the device A. In a case where a connectionresponse data frame has not been received from the device B (No in StepS104), the device A waits for a connection response data frame (StepS105), and the process is returned to Step S104. When the connectionresponse data frame is received from the device B (Yes in Step S104),the device A is connected as a master and gives a notification of aconnection establishment (Step S106), performs a master process such asa push transmission process or a pull reception process (Step S107), andends the communication with the opposing device (Step S114). The processfrom Step S103: No to Step S107 is a general process similar to aconventional case, and thus, detailed description thereof will not bepresented.

In a case where the priority level of the above-described device and thepriority level of the opposing device are the same (in a case where bothdevices are masters or dynamics) (Yes in Step S103), in each of thedevices A and B, the communication control unit 14 gives a notificationof an occurrence of a conflict (Step S108).

In each of the devices A and B, when the conflict occurrencenotification is received, the communication direction managing unit 12reads UID information from a connection request data frame of theopposing device and stores the read UID information (Step S109). FIG. 4is a diagram that illustrates an example of the configuration of a dataframe of TransferJet. A data frame that is transmitted and received inthe data link layer of TransferJet is configured by: an LiCC versionthat represents version information (specification information) fromwhich it can be checked whether or not a bidirectional communicationoperation according to this embodiment is supported; an LiCC thatrepresents the data frame type; “Reserved” that represents reservedinformation; an Own UID that represents a UID of a transmission sourcedevice; and an LiCC information that is information of a data frame. Ina case where each of the devices A and B is connected to the opposingdevice in the data link layer, UID information and version informationcan be acquired from the opposing device. The device A acquires a UID“0x11111111” from the device B that is an opposing device, and thedevice B acquires a UID “0x22222222” from the device A that is anopposing device.

In each of the devices A and B, the communication direction managingunit 12 transmits a cut-off request data frame, thereby cutting off aconnection with the opposing device once (Step S110).

In each of the devices A and B, the communication direction managingunit 12 checks the version information of the connection request dataframe received from the opposing device after the cutting off of theconnection and checks whether or not the opposing device is compliantwith the bidirectional communication operation according to thisembodiment as well (Step S111).

In each of the devices A and B, in a case where the opposing device iscompliant with the bidirectional communication operation according tothis embodiment (Yes in Step S111), a bidirectional communicationprocess is performed (Step S112), and the communication with theopposing device ends (Step S114). On the other hand, in each of thedevices A and B, in a case where the opposing device is not compliantwith the bidirectional communication operation according to thisembodiment (No in Step S111), a unidirectional communication process isperformed (Step S113), and the communication with the opposing deviceends (Step S114).

In this embodiment, an operation of the bidirectional communication(Step S112) will be described. FIG. 5 is a flowchart that illustratesthe bidirectional communication process according to this embodiment.Here, the description will be focused on the device A.

In each of the devices A and B, the communication direction managingunit 12 compares the UID of the device to which it belongs and the UIDof the opposing device at the time of the previous connection, and adevice having a larger UID first becomes a master, and a device having asmaller UID first becomes a slave (Step S201). In the device A, sincethe UID of the device A>the UID of the device B (Yes in Step S201), thecommunication direction managing unit 12 determines that the device towhich it belongs becomes a master. On the other hand, in the device B,since the UID of the device A>the UID of the device B (No in Step S201),the communication direction managing unit 12 determines that the deviceto which it belongs becomes a slave.

In the device A, the communication control unit 14 transmits aconnection request data frame (Step S202) and, in a case where aconnection response data frame has not been received from the device B(No in Step S203), continuously transmits a connection request dataframe on a regular basis until a connection response data frame isreceived (Step S202).

In the device A, when the communication control unit 14 receives aconnection response data frame from the device B (Yes in Step S203), thecommunication control unit 14 compares the UID included in theconnection response data frame with the UID of the opposing device atthe time of the previous connection (Step S204). In a case where theUIDs do not match each other (No in Step S204), the communicationcontrol unit 14 ends bidirectional communication. On the other hand, ina case where the UIDs match each other (Yes in Step S204), thecommunication control unit 14 notifies the application unit 11 of theestablishment of a connection (Step S205) The application unit 11performs a connection as a master (Step S205).

In the device A, the transmission condition information managing unit 13acquires transmission condition information from the device B of theslave side (Step S206) and determines a master process for the device Bof the slave side based on the acquired information. More specifically,selection of a file to be transmitted and the like are performed, anddetails thereof will be described in an embodiment to be describedlater.

In the device A, the application unit 11 performs a master processessuch as push transmission or pull reception in accordance with themaster process determined by the transmission condition informationmanaging unit 13 (Step S207).

When the master process is completed, in the device A, the communicationdirection managing unit 12 transmits a cut-off request data frame to thedevice B (opposing device) of the slave side together with a masterprocess completion notification, thereby cutting off the connection withthe opposing device once (Step S208).

The communication direction managing unit 12 checks whether or not aprocess of bidirectional communication of the master side and the slaveside has been completed (Step S209). In a case where the process ofbidirectional communication of the master side and the slave side hasnot been completed (No in Step S209), the communication directionmanaging unit 12 sets a slave as a mode that has not been completed yet,here, the mode of the application unit 11, and the communication controlunit 14 is in a connection waiting state in the slave mode (Step S210).On the other hand, in a case where the process of bidirectionalcommunication is completed (Yes in Step S209), the communicationdirection managing unit 12 ends the bidirectional communication.

In the device A, the communication control unit 14 waits until aconnection request data frame is received from the device B (No in StepS211). When the connection request data frame is received (Yes in StepS211), the communication control unit 14 transmits a connection responsedata frame (Step S212).

In the device A, the communication control unit 14 compares a UIDincluded in the connection request data frame transmitted from thedevice B with the UID of the opposing device at the time of the previousconnection (Step S213). In a case where the UIDs do not match each other(No in Step S213), the communication control unit 14 ends thebidirectional communication. On the other hand, in a case where the UIDsmatch each other (Yes in Step S213), the communication control unit 14notifies the application unit 11 of the establishment of a connection(Step S214). The application unit 11 performs a connection as a slave(Step S214).

In the device A, the application unit 11 performs a process (a datareception process according to a push from the device B that is amaster, a data transmission process according to pull, and the like) ofthe slave side (Step S215).

In the device A, when the slave process is completed, the communicationcontrol unit 14 waits for a cut-off request data frame transmitted fromthe device B (Step S216). The communication control unit 14 waits untilthe cut-off request data frame is received from the device B (No in StepS217) and cuts off the connection with the device B when the cut-offrequest data frame is received (Yes in Step S217).

The communication direction managing unit 12 checks whether or not theprocess of bidirectional communication of the master side and the slaveside has been completed (Step S218). In a case where the process ofbidirectional communication of the master side and the slave side hasbeen completed (Yes in Step S218), the communication direction managingunit 12 ends the bidirectional communication. On the other hand, in acase where the process of the bidirectional communication of the masterside and the slave side has not been completed (No in Step S218), thecommunication direction managing unit 12 sets a master as a mode thathas not been completed, here, the mode of the application unit 11, andthe communication control unit 14 transmits a connection request dataframe as the master mode (Step S202).

In this way, the device A performs the process in order of Steps S201 toS218 and ends the process of the bidirectional communication. On theother hand, since Step S201: No is satisfied, the device B performs theprocess in order of Steps of S201, S210 to S218, and S202 to S209 andends the process of the bidirectional communication. In any of thedevices, by making a connection to an opposing device by performingswitching between the master and the slave, communication in each modecan be performed.

In the file transmission/reception process illustrated in FIG. 3 and theprocess of the bidirectional communication illustrated in FIG. 5, thereare several processes of the devices A and B cutting off the connectiononce and making reconnection. However, a case may be considered in whichthe reconnection cannot be made due to detachment of the opposing deviceduring the cutting-off of the connection, breakdown of the opposingdevice, or the like. Accordingly, in the devices A and B, in a casewhere a reconnection to the opposing device cannot be made for apredetermined period or more in the reconnection process, thebidirectional process ends in the middle of the process.

The file transmission/reception process performed by the devices A and Bwill be described with reference to a sequence diagram. FIG. 6 is asequence diagram that illustrates the file transmission/receptionprocess between the devices A and B. Step S301 corresponds to theprocess of Steps S101 to S111 illustrated in FIG. 3. In addition, StepS302 corresponds to Steps S201 to S209 illustrated in FIG. 5 for thedevice A and corresponds to Steps S201 and Steps S210 to S218illustrated in FIG. 5 for the device B. Furthermore, Step S303corresponds to Steps S201 and S210 to S218 illustrated in FIG. 5 for thedevice A and corresponds to Steps S201 to S209 illustrated in FIG. 5 forthe device B. In this way, the devices A and B performs a similarprocess of performing switching between the master and the slave afteran occurrence of a conflict, whereby bidirectional communication can beperformed.

FIG. 7 is a diagram that illustrates mode transitions of each device. Inthe sequence diagram illustrated in FIG. 6, each device state isextracted. First, as State 1, since devices A and B make connectionrequests as masters, a conflict occurs, and accordingly, communicationcannot be performed. Next, as a result of a comparison between UIDs,first, as State 2, the device A operates as a master, and the device Boperates as a slave. When the devices A and B approach each other inthis state, a connection is established, and data communication isperformed from the device A. When the data communication from the deviceA is completed, the mode is switched, and, as State 3, the device Aoperates as a slave, and the device B operates as a master. When thedevices A and B approach each other in this state, a connection isestablished, and data communication from the device B can be performed.

In addition, in the communication device 1, although not illustrated inFIG. 1, a current communication state and a communication result can berepresented in a display unit included in the communication device to auser. FIG. 8 is a diagram that illustrates an example of a display of acommunication state in the communication device 1. For example, in thecommunication device 1 that is in the middle of performing abidirectional communication process, in the middle of performing a slaveprocess for the first time, in a case where a master process is notperformed yet, by displaying “No Communication” as the master, “Middleof Communication” as the slave, and “Currently in Middle of SlaveCommunication”, a state of the device can be represented to the user. Asa content to be displayed, in a case where one of the modes iscompleted, “Communication Completion” is represented. FIG. 9 is adiagram that illustrates an example of a display after completion ofbidirectional communication in the communication device 1. In eachdevice, in a case where the master process and the slave process arecompleted as the bidirectional communication process, by displaying“Communication Completion” as the master, “Communication Completion” asthe slave, and “Completion of Bidirectional Communication”, the state ofthe device can be represented to the user. As a content to be displayed,“Communication Failure” is displayed in a case where communicationfails, and “No Communication Data” is displayed in a case where there isno communication data.

In this embodiment, in a case where two devices perform communication bybeing switched between the master and the slave through bidirectionalcommunication, as described above, the communication with the opposingdevice is cut off once, and a process of switching between the modes andthen making a reconnection is performed. As a method of switching twodevices between the master and the slave, there is a method in whichswitching is checked by transmitting confirmation information ofswitching from the master to the slave, switching from the slave to themaster, or the like between the two devices. However, by cutting off thecommunication once, each device can reliably recognize timing at whichthe mode of the opposing device is switched and can be restarted in astate in which the modes thereof are determined.

In addition, in this embodiment, in a case where a conflict occursbetween a device and an opposing device, while the devices areconfigured to be automatically switched between the modes of the masterand the slave, it may be configured such that an operation is receivedfrom a user operating the device, and bidirectional communication may bestarted at timing according to manual operation. In such a case, inaccordance with a user operation, one device may be configured as amaster, and the other device may be configured as a slave. In addition,also even when a conflict does not occur between the device and theopposing device, in a case where there is a file desired to betransmitted or received, a user may manually start bidirectionalcommunication.

Furthermore, in this embodiment, while each device exchanges theinformation of UIDs with the opposing device and determines the mode ofthe master or the slave in accordance with the magnitude of the UIDs,the method of determining the mode is not limited thereto. While eachdevice exchanges the information of UIDs with the opposing devicethrough a data frame, by using “Reserved” of the data frame, theinformation may include information of setting/clearing a bit or thelike, for example, for information relating to a file such asinformation representing a priority level of the file, a file size,presence/no-presence of a file to be transmitted or received, andrequirement/no-requirement of transmission/reception of the file. Eachdevice may determine the mode by using such information relating to afile.

In addition, in this embodiment, while a case has been described inwhich a file is transmitted and received using TransferJet as near fieldcommunication, the case is an example, and the technology is not limitedto TransferJet.

According to the first embodiment, the communication device 1 that is afile transmission/reception device, in a case where a conflict occursbetween the communication device and the opposing device due to the samemode, transmits and receives UIDs to/from the opposing device in a statein which communication of a data frame can be performed in the data linklayer, and, based on a result of the comparison between the UID of theopposing device and the UID of the communication device, operates as amaster or a slave that is different from the mode of the opposing deviceso as to perform the process in one mode. Thereafter, the communicationdevice 1 together with the opposing device switches the mode andperforms the process in the other mode, thereby performing transmission,reception, or transmission/reception of a file. As a result, anadvantage of being capable of resolving a conflict andtransmitting/receiving a file between the device and the opposing deviceeven in a case where the conflict occurs between the communicationdevice and the opposing device can be acquired.

Second Embodiment

In this embodiment, a process of bidirectional communication (Step S112illustrated in FIG. 3) different from that of the first embodiment willbe described. The configuration of a communication device 1 is similarto that of the first embodiment, and a file transmission/receptionprocess (the flowchart illustrated in FIG. 3) other than thebidirectional communication process is similar to that of the firstembodiment.

FIG. 10 is a flowchart that illustrates the process of bidirectionalcommunication according to this embodiment. By switching the modes ofdevices in the sequence represented in the following flowchart, thedevices sequentially become a master and a slave and can mutuallytransmit desired files.

In each of devices A and B, a communication direction managing unit 12generates a random number (Step S401) and is in a connection requestwaiting state (Step S402).

In the devices A and B, in a case where a connection request data frameis not received from an opposing device (No in Step S403), thecommunication direction managing unit 12 continues this state(connection request waiting state) until a random number time that isbased on the generated random number elapses (No in Step S404). Then, ina case where the random number time elapses, in other words, in a casewhere a connection request data frame has not been received from theopposing device during the connection request waiting state (Yes in StepS404), after waiting for the connection request is stopped (Step S405),the communication direction managing unit 12 sets the mode of the deviceto which it belongs as a master again. Here, as an example, a case willbe described in which the device A has a generated random number smaller(a random number time is shorter) than that of the device B and has notreceived a connection request data frame from the opposing device duringthe connection request waiting state (Yes in Step S404). In addition, ina case where a connection request data frame has been received from theopposing device (Yes in Step S403), the communication direction managingunit 12 causes the process to proceed to the process of Step S416.

In the device A, the communication control unit 14 transmits aconnection request data frame (Step S406) and, in a case where aconnection response data frame has not been received from the device B(No in Step S407), continuously transmits the connection request dataframe on a regular basis until the connection response data frame isreceived (Step S406).

In the device A, when the connection response data frame is receivedfrom the device B (Yes in Step S407), the communication control unit 14compares a UID included in the connection response data frame with a UIDof the opposing device at the time of the previous connection (StepS408). In a case where the UIDs do not match each other (No in StepS408), the communication control unit 14 ends the bidirectionalcommunication. On the other hand, in a case where the UIDs match eachother (Yes in Step S408), the communication control unit 14 notifies anapplication unit 11 of the establishment of a connection (Step S409).The application unit 11 performs a connection as a master (Step S409).

In the device A, the transmission condition information managing unit 13acquires transmission condition information from the device B of theslave side (Step S410) and determines a master process for the device Bof the slave side based on the acquired information. More specifically,selection of a file to be transmitted and the like are performed, anddetails thereof will be described in an embodiment to be describedlater.

In the device A, the application unit 11 performs a master processessuch as push transmission or pull reception in accordance with themaster process determined by the transmission condition informationmanaging unit 13 (Step S411).

When the master process is completed, in the device A, the communicationdirection managing unit 12 transmits a cut-off request data frame to thedevice B (opposing device) of the slave side together with a masterprocess completion notification, thereby cutting off the connection withthe opposing device once (Step S412).

The communication direction managing unit 12 checks whether or not aprocess of bidirectional communication of the master side and the slaveside has been completed (Step S413). In a case where the process ofbidirectional communication of the master side and the slave side hasnot been completed (No in Step S413), the communication directionmanaging unit 12 sets a slave as a mode that has not been completed yet,here, the mode of the application unit 11, and the communication controlunit 14 is in a connection waiting state in the slave mode (Step S414).On the other hand, in a case where the process of bidirectionalcommunication is completed (Yes in Step S414), the communicationdirection managing unit 12 ends the bidirectional communication.

In the device A, the communication control unit 14 waits until aconnection request data frame is received from the device B (No in StepS415). When the connection request data frame is received (Yes in StepS415), the communication control unit 14 transmits a connection responsedata frame (Step S416).

In the device A, the communication control unit 14 compares a UIDincluded in the connection request data frame transmitted from thedevice B with the UID of the opposing device at the time of the previousconnection (Step S417). In a case where the UIDs do not match each other(No in Step S417), the communication control unit 14 ends thebidirectional communication. On the other hand, in a case where the UIDsmatch each other (Yes in Step S417), the communication control unit 14notifies the application unit 11 of the establishment of a connection(Step S418). The application unit 11 performs a connection as a slave(Step S418).

In the device A, the application unit 11 performs a process (a datareception process according to a push from the device B that is amaster, a data transmission process according to pull, and the like) ofthe slave side (Step S419).

In the device A, when the slave process is completed, the communicationcontrol unit 14 waits for a cut-off request data frame transmitted fromthe device B (Step S420). The communication control unit 14 waits untilthe cut-off request data frame is received from the device B (No in StepS421) and cuts off the connection with the device B when the cut-offrequest data frame is received (Yes in Step S421).

The communication direction managing unit 12 checks whether or not theprocess of bidirectional communication of the master side and the slaveside has been completed (Step S422). In a case where the process ofbidirectional communication of the master side and the slave side hasbeen completed (Yes in Step S422), the communication direction managingunit 12 ends the bidirectional communication. On the other hand, in acase where the process of the bidirectional communication of the masterside and the slave side has not been completed (No in Step S422), thecommunication direction managing unit 12 sets a master as a mode thathas not been completed, here, the mode of the application unit 11, andthe communication control unit 14 transmits a connection request dataframe as the master mode (Step S406).

In this way, the device A performs the process in order of Steps S401 toS422 and ends the process of the bidirectional communication. On theother hand, since Step S403: No is satisfied, the device B performs theprocess in order of Steps of S401 to S403, S416 to S422, and S406 toS413 and ends the process of the bidirectional communication. In any ofthe devices, by making a connection to an opposing device by performingswitching between the master and the slave, communication in each modecan be performed.

In the file transmission/reception process illustrated in FIG. 3 and theprocess of the bidirectional communication illustrated in FIG. 10, thereare several processes of the devices A and B cutting off the connectiononce and making reconnection. However, a case may be considered in whichthe reconnection cannot be made due to detachment of the opposing deviceduring the cutting-off of the connection, breakdown of the opposingdevice, or the like. Accordingly, in the devices A and B, in a casewhere a reconnection to the opposing device cannot be made for apredetermined period or more in the reconnection process, thebidirectional process ends in the middle of the process.

In this embodiment, a sequence diagram (see FIG. 6) of the filetransmission/reception process performed in the devices A and B, adiagram (see FIG. 7) that illustrates the mode transitions of eachdevice, and examples (see FIGS. 8 and 9) of the display in thecommunication device are similar to those of the first embodiment.

In addition, in this embodiment, while the timing for switching eachdevice to the master is based on a generated random number, the presentinvention is not limited thereto. Since the timing for switching eachdevice to the master only needs to be configured to be changed, any timeparameter other than a random number may be used.

Furthermore, it may be configured such that each device exchanges theinformation of random numbers according to this embodiment with theopposing device, similar to the first embodiment, the random numbers aresubstituted by UIDs, and a master or a slave is determined based on themagnitude relation between the random numbers.

According to the second embodiment, the communication device 1 that is afile transmission/reception device, in a case where a conflict occursbetween the communication device and the opposing device due to the samemode, generates a random number and operates as a slave. Thereafter, ina case where a random number time has elapsed without receiving aconnection request data frame from the opposing device, thecommunication device 1 is switched to the master mode and performs aprocess of the master mode by transmitting a connection request dataframe to the opposing device. On the other hand, in a case where aconnection request data frame is received from the opposing devicebefore the random number time elapses, the communication device 1performs the process of the slave mode, after performing the process ofone mode, switches the mode together with the opposing device, andperforms the process of the other mode for performing communication. Asa result, an advantage of being capable of resolving a conflict andtransmitting/receiving a file between the device and the opposing deviceeven in a case where the conflict occurs between the communicationdevice and the opposing device can be acquired.

In addition, different from the first embodiment, bidirectionalcommunication can be performed without exchanging information other thana UID identifying the opposing device between the communication deviceand the opposing device.

Third Embodiment

In this embodiment, the process of unidirectional communication (StepS113 represented in FIG. 3) according to the first embodiment, in otherwords, a case where one of devices A and B is not compliant with abidirectional communication operation according to the first (or second)embodiment (No in Step S111 represented in FIG. 3) will be described.Here, while the devices A and B can perform the TransferJetcommunication, only the device A is compliant with the bidirectionalcommunication described in the first (or the second) embodiment, but thedevice B is not compliant with the bidirectional communication describedin the first (or the second) embodiment.

The device B does not have a bidirectional communication function andthus cannot be automatically switched to a slave mode. Accordingly, evenin a case where a conflict occurs as the device A compliant with thebidirectional communication is switched to the slave mode,unidirectional communication can be realized.

FIG. 11 is a flowchart that illustrates a unidirectional communicationprocess according to this embodiment. According to the sequencerepresented in the following flowchart, a desired file can betransmitted from the device B to the device A. The filetransmission/reception process (Steps S101 to S111 represented in FIG.3) up to the process of the unidirectional communication (Step S113) isas described above.

In the devices A and B, in a case where the opposing device is notcompliant with the operation of the bidirectional communicationaccording to this embodiment (No in Step S111), the unidirectionalcommunication process is performed (Step S113), and the communicationwith the opposing device ends (Step S114).

At this time, in the device A that is compliant with the operation ofthe bidirectional communication, since the device B that is the opposingdevice is not compliant with the operation of the bidirectionalcommunication, the communication direction managing unit 12 sets a slaveas the mode of the application unit 11 of the device to which it belongsand is in a connection request waiting state (Step S501).

In the device A, the communication control unit 14 waits until aconnection request data frame is received from the device B (No in StepS502). When the connection request data frame is received (Yes in StepS502), the communication control unit 14 transmits a connection responsedata frame (Step S503).

In the device A, the communication control unit 14 compares a UIDincluded in the connection request data frame transmitted from thedevice B with the UID of the opposing device at the time of the previousconnection (Step S504). In a case where the UIDs do not match each other(No in Step S504), the communication control unit 14 ends theunidirectional communication. On the other hand, in a case where theUIDs match each other (Yes in Step S504), the communication control unit14 notifies the application unit 11 of the establishment of a connection(Step S505). The application unit 11 performs a connection as a slave(Step S505).

In the device A, the application unit 11 performs a process (a datareception process according to a push from the device B that is amaster, a data transmission process according to pull, and the like) ofthe slave side (Step S506).

In the device A, when the slave process is completed, the communicationcontrol unit 14 cuts off the connection with the device B bytransmitting a cut-off process to the device B (Step S507). Then, sincethe unidirectional process is completed, the communication ends.

FIG. 12 is a diagram that illustrates mode transitions of each device.First, as State 1, since devices A and B make connection requests asmasters, a conflict occurs, and accordingly, communication cannot beperformed. At this time, data frames are transmitted/received betweenthe devices A and B, and the device A is aware that the device B that isthe opposing device is not compliant with bidirectional communicationbased on the version information included in the data frame.Accordingly, the device A, as State 2, operates as a slave and canestablish a connection with the device B that is the master, and thusdata communication can be performed from the device B.

FIG. 13 is a diagram that illustrates an example of a display aftercompletion of the unidirectional communication in the communicationdevice 1. In the device A, the master process as theunidirectional/bidirectional communication process fails, and the slaveprocess is completed and, by displaying the completion of only the slavecommunication, the state of the device A can be represented to the user.At this time, an error display for giving a notification representingthat the opposing device is a device not compliant with thebidirectional communication may be displayed.

According to the third embodiment, the communication device 1 that is afile transmission/reception device, in a case where a conflict occursbetween the communication device and the opposing device due to the samemode, operates in the slave mode and performs only the unidirectionalcommunication having the opposing device as the master in a case wherethe opposing device is not compliant with the bidirectionalcommunication according to the first (or the second) embodiment. As aresult, an advantage of realizing the unidirectional communication in adirection from the bidirectional communication non-compliant device tothe bidirectional communication-compliant device even in a case where aconflict occurs can be acquired.

Fourth Embodiment

In this embodiment, a function of automatically limiting a file to betransmitted based on transmission condition information acquired from aslave device when a master device transmits data to the slave devicewill be described.

More specifically, the use of a removable device (an SD card, an SDIOcard, a dongle, or the like) as a device having a radio communicationfunction will be considered. In a case where the device having the radiocommunication function is a removable device, this device may beconsidered to be used by being replaced by various host devices.Accordingly, there are cases where information of a communicationpartner (host device) cannot be specified based on a UID of the device.Accordingly, in order to identify the communication partner, informationof a host device type and a serial number is used.

FIG. 14 is a diagram that illustrates an example of the configurationsof a communication device 1 a and a host device 2 according to thisembodiment. The communication device 1 a that is a filetransmission/reception device, for example, as described above, is aremovable device such as an SD card, an SDIO card, or a dongle. However,the communication device 1 a is not limited thereto. In addition, thehost device 2, for example, is a digital camera, a personal computer(PC), or the like. However, the host device 2 is not limited thereto.

The communication device 1 a includes: an application unit 11; acommunication direction managing unit 12; a transmission conditioninformation managing unit 13; a communication control unit 14; aconnection partner management table 15; a transmission list table 16;and a host device I/F unit 17. The host device I/F unit 17 is aninterface that transmits/receives data to/from the host device 2.

In the communication device 1 a, the transmission condition informationmanaging unit 13 acquires information (a serial number, a user name, andthe like) of the host device 2 from the device information managing unit20 of the host device 2 through the host device I/F unit 17.

The host device 2 includes: a user I/F unit 10; a device informationmanaging unit 20; and a communication device I/F unit 21. The deviceinformation managing unit 20 manages information of the host device 2such as a serial number of the host device 2, and a “user name” inputfrom a user. The communication device I/F unit 21 is an interface thattransmits/receives data to/from the communication device 1 a.

Next, a file transmission process according to this embodiment will bedescribed. FIG. 15 is a diagram that illustrates an example of theconfiguration of devices and a connection partner management table 15according to this embodiment. For example, the device A is thecommunication device 1 having the configuration illustrated in FIG. 1,and the device B is the communication device 1 a having theconfiguration illustrated in FIG. 14. Here, the device A may beconfigured as the communication device 1 a having the configurationillustrated in FIG. 14. FIG. 15 illustrates that the device B can beconnected to four host devices 2 (host devices A, B, C, and D). In orderto actually communicate with the device A, the device B is connected toone host device 2.

In the case illustrated in FIG. 15, in the devices A and B having theradio communication function, it is assumed that the device A operatesas a transmission-side device (master), and the device B operates as areception-side device (slave). The device B is a removable device andthus can be inserted into various host devices 2, and the radiocommunication function can be added to the host device 2.

First, the device A that is the master side, before performingtransmission, registers a “host device type” of each host device 2 and a“serial number of the host device” in the connection partner managementtable 15 through the user I/F unit 10 in accordance with an input from auser and registers a category (“Family”, “Business”, “Friend”,“Personal”, or the like) to which the host device 2 belongs.

The transmission condition information managing unit 13 of the device Asets a category that may be transmitted for each file to be transmittedand registers the categories in the transmission list table 16. Thetransmission condition information managing unit 13 of the device A mayselect a plurality of categories that may be transmitted for each file.

In the device B, the transmission condition information managing unit 13of the communication device 1 a acquires the information of the “hostdevice type” and the “serial number of the host device” from the deviceinformation managing unit 20 of the host device 2 through the hostdevice I/F unit 17 and the communication device I/F unit 21 and storesthe acquired information as transmission condition information.

When a connection between the device A and the device B is established,the transmission condition information managing unit 13 of the device Athat is the master side acquires the information (the “host device type”and the “serial number of the host device”) of the host device 2 towhich the device B is connected from the device B that is the slave sideas the transmission condition information.

In the device A, in a case where the acquired information of the hostdevice 2 is included in the connection partner management table 15, thecategory of the partner device can be specified, and accordingly, thetransmission condition information managing unit 13 transmits only filesthat match the category among files included in the transmission listtable 16. In addition, to the host devices 2 of which the categories are“Personal”, the transmission condition information managing unit 13 maytransmit files with a condition such as transmission of all the filesbeing designated. In a case where the acquired information of the hostdevice 2 is not included in the connection partner management table 15,the transmission condition information managing unit 13 transmits onlyfiles of which categories are “Guest”.

FIG. 16 is a diagram that illustrates an example of the configuration ofdevices and a transmission list table 16 according to this embodiment.The device A having the transmission list table 16 illustrated in FIG.16 transmits files as illustrated below in a case where the device Bthat is a removable device is inserted to each host device 2.

In a case where the device B is inserted into the host device 2 (hostdevice A) of which category is registered as “Friend” for communication,the device A transmits files of Nos. 2, 3, 6, and 7.

In a case where the device B is inserted into the host device 2 (hostdevice B) of which category is registered as “Business” forcommunication, the device A transmits a file of No. 1.

In a case where the device B is inserted into the host device 2 (hostdevice C) of which category is registered as “Family” for communication,the device A transmits files of Nos. 4, 5, 6, and 7.

In a case where the device B is inserted into the host device 2 (hostdevice D) of which category is registered as “Personal” forcommunication, the device A transmits all the files.

On the other hand, in a case where the device B is inserted into thehost device 2 that is not registered, the device A handles the hostdevice 2 as a “Guest” and transmits files of Nos. 5, 6, and 7.

Here, while a case has been described in which files are transmittedfrom the device A to the device B, files may be transmitted from thedevice B to the device A. In such a case, in a case where data (file)satisfying the transmission condition is not present in one device, adisplay may be performed as illustrated in FIG. 17. FIG. 17 is a diagramthat illustrates an example of a display after completion ofbidirectional communication in the communication device 1 a. In a casewhere data satisfying the transmission condition is not present, byperforming an error display indicating no presence of the data, thestate of the communication device can be represented to a user.

According to the fourth embodiment, in the communication device 1 or thecommunication device 1 a that is a file transmission/reception device,in a case where the opposing device is a removable device (communicationdevice 1 a) having the radio communication function, since the opposingdevice may be considered to be used by being replaced by various hostdevices 2, the information of the “host device type” of the host device2 and the “serial number of the host device” is used for theidentification of the communication partner. As a result, by setting theconnection partner management table 15 and the transmission list table16, an advantage of setting a file to be transmitted for each hostdevice 2 can be acquired.

Fifth Embodiment

In this embodiment, a function of automatically limiting a file to betransmitted based on transmission condition information acquired from aslave device when a master device transmits data to the slave devicewill be described as a method different from that of the fourthembodiment.

In this embodiment, a user name is used for the identification of acommunication partner. In addition, the configuration of the device Bside is similar to the configuration illustrated in FIG. 14 that hasbeen described in the fourth embodiment.

Next, a file transmission process according to this embodiment will bedescribed. FIG. 18 is a diagram that illustrates an example of theconfiguration of devices and a connection partner management table 15according to this embodiment. For example, the device A is thecommunication device 1 having the configuration illustrated in FIG. 1,and the device B is the communication device 1 a having theconfiguration illustrated in FIG. 14. Here, the device A may beconfigured as the communication device 1 a having the configurationillustrated in FIG. 14.

First, the device A that is the master side, before performingtransmission, registers a “user name” of each host device 2 and acategory (“Family”, “Business”, “Friend”, “Personal”, or the like) towhich the host device 2 belongs in the connection partner managementtable 15 through the user I/F unit 10 in accordance with an input from auser.

The transmission condition information managing unit 13 of the device Asets a category that may be transmitted for each file to be transmittedand registers the categories in the transmission list table 16. Thetransmission condition information managing unit 13 of the device A mayselect a plurality of categories that may be transmitted for each file.

In the device B, the user registers a “user name” in each host device 2through the user I/F unit 10 of each host device 2, and the deviceinformation managing unit 20 of each host device 2 stores the registereduser name.

In the device B, the transmission condition information managing unit 13of the communication device 1 a acquires information of the “user name”from the device information managing unit 20 of the host device 2through the host device I/F unit 17 and the communication device I/Funit 21 and stores the acquired information as transmission conditioninformation.

When a connection between the device A and the device B is established,the transmission condition information managing unit 13 of the device Athat is the master side acquires the information (the “user name”) ofthe host device 2 to which the device B is connected from the device Bthat is the slave side as the transmission condition information.

In the device A, in a case where the acquired information of the hostdevice 2 is included in the connection partner management table 15, thecategory of the partner device can be specified, and accordingly, thetransmission condition information managing unit 13 transmits only filesthat match the category among files included in the transmission listtable 16. In addition, to the host devices 2 of which the categories are“Personal”, the transmission condition information managing unit 13 maytransmit files with a condition such as transmission of all the filesbeing designated. In a case where the acquired information of the hostdevice 2 is not included in the connection partner management table 15,the transmission condition information managing unit 13 transmits onlyfiles of which categories are “Guest”.

FIG. 19 is a diagram that illustrates an example of the configuration ofdevices and a transmission list table 16 according to this embodiment.The device A having the transmission list table 16 illustrated in FIG.19 transmits files as illustrated below in a case where the device Bthat is a removable device is inserted to each host device 2.

In a case where the device B is inserted into the host device 2 (hostdevice A) of which category is registered as “Friend” for communication,the device A transmits files of Nos. 2, 3, 6, and 7.

In a case where the device B is inserted into the host device 2 (hostdevice B) of which category is registered as “Business” forcommunication, the device A transmits a file of No. 1.

In a case where the device B is inserted into the host device 2 (hostdevice C) of which category is registered as “Family” for communication,the device A transmits files of Nos. 4, 5, 6, and 7.

In a case where the device B is inserted into the host device 2 (hostdevice D) of which category is registered as “Personal” forcommunication, the device A transmits all the files.

On the other hand, in a case where the device B is inserted into thehost device 2 that is not registered, the device A handles the hostdevice 2 as a “Guest” and transmits files of Nos. 5, 6, and 7.

According to the fifth embodiment, in the communication device 1 or thecommunication device 1 a that is a file transmission/reception device,in a case where the opposing device is a removable device (communicationdevice 1 a) having the radio communication function, since the opposingdevice may be considered to be used by being replaced by various hostdevices 2, the information of the “user name” of the host device 2 isused for the identification of the communication partner. As a result,by setting the connection partner management table 15 and thetransmission list table 16, an advantage of setting a file to betransmitted for each host device 2 can be acquired.

Sixth Embodiment

According to the fourth and fifth embodiments, the method ofautomatically limiting a file to be transmitted based on thetransmission condition information has been described. Here, as a methodof transmitting files in near field communication, in addition to amethod of transmitting all the files stored in a medium, there areseveral methods such as a method of transmitting files of only a certainperiod. In this embodiment and the subsequent embodiments, a differencetransmission method will be described. In the first to fifthembodiments, while a communication device that is a filetransmission/reception device is represented as the device, hereinafter,for description of a file transmission method, in order to allow thetransmission side and the reception side of the file to be easilydetermined, the communication device may be represented as atransmission device or a reception device.

FIG. 20 is a diagram that illustrates a basic difference transmissionmethod. In the transmission device, files 1 to 6 are assumed to bepresent at the time of the first transmission, and files 1 to 10 areassumed to be present at the time of the second transmission.

As the difference transmission method, there is a method for making aselection on the transmission side in which a transmission device and areception device are present, and, in a case where the transmissiondevice performs a transmission process for a same reception deviceseveral times, in order not to duplicately transmit the same file,before transmitting a file, the file is compared with a pasttransmission content of a transmission history, and only a newly-addedfile is transmitted. The transmission device selects only an addedportion (files 7 to 10) and transmits the selected added portion to thereception device.

In addition, as another difference transmission method, there is amethod for making a selection on the reception side in which atransmission device and a reception device are present, and, aftertransmission history files thereof are exchanged, in a case where thereare additional files on the transmission device side when files arecompared with a past reception content, the reception device requestsfiles desired to be received from the transmission device so as to causethe files to be transmitted from the transmission device. The receptiondevice selectively requests an additional portion (files 7 to 10) asfiles desired to be received, and the transmission device transmits therequested files 7 to 10 to the reception device.

FIG. 21 is a diagram that illustrates an example of the configuration ofthe communication device 1 b according to this embodiment. Thecommunication device 1 b that is a file transmission/reception deviceincludes: a user I/F unit 10; an application unit 11; a communicationdirection managing unit 12; a transmission condition informationmanaging unit 13; a communication control unit 14; a connection partnermanagement table 15; a transmission list table 16; and a differencetransmission control unit 18. The difference transmission control unit18 generates a transmission history (transmission information andreception information) for each connected device, stores thetransmission histories in a memory area every time when the transmissionis completed, and compares the transmission histories at the nexttransmission time, thereby performing control such that the same data isnot duplicately transmitted. As the software configuration of thedifference transmission control unit 18, the configuration ofapplications in the application layer illustrated in FIG. 2 is employed.

FIG. 22 is a diagram that illustrates an example of the configuration ofthe difference transmission control unit 18 according to thisembodiment. The difference transmission control unit 18 includes: atransmission history storage processing unit 30; a transmission historystoring unit 31; a transmission history comparing unit 32; a packetstoring unit 33; and a restoration processing unit 34.

The transmission history storage processing unit 30 stores informationof files stored in a storage unit, which is not illustrated in thefigure, of the communication device 1 b and files that aretransmitted/received to/from other devices in the transmission historystoring unit 31.

The transmission history storing unit 31 is a storage unit that storesthe information of files stored in the storage unit, which is notillustrated in the figure, of the communication device 1 b and filestransmitted/received to/from other devices as a transmission historylist.

The transmission history comparing unit 32 compares the transmissionhistory of the device to which it belongs, which is stored in thetransmission history storing unit 31, with the transmission historyacquired from the opposing device. Here, the transmission historystoring unit 31 may be arranged inside a storage unit, which is notillustrated in the figure, arranged inside the communication device 1 band used for storing files and the like instead of being arranged insidethe difference transmission control unit 18.

When a file is received from another device, the packet storing unit 33temporarily stores successfully received packets in a case where thereis a packet that has not been received from among packets configuringthe file.

The restoration processing unit 34 restores the file by using thepackets stored in the packet storing unit 33 and remaining packetsconfiguring the file that have been newly received.

FIG. 23 is a diagram that illustrates a file transmission relation witha device A being considered as the center. Here, it is assumed thatthere are four devices A, B, C, and D as the communication devices 1 b,and the device A can transmit/receive files to/from the other devices B,C, and D.

FIG. 24 is a diagram that illustrates an example of the configuration ofthe transmission history list stored in the transmission history storingunit 31 of the device A. FIG. 25 is a diagram that illustrates anexample of the configuration of the transmission history list stored inthe transmission history storing unit 31 of the device B. Thetransmission history list stores: a category of transmission orreception; a partner device ID of a file transmission/reception target;a file name of a file that is transmitted or received; update date andtime for the file; a size of the file; a packet representing packetinformation of packets that have been successfully received in a casewhere transmission is interrupted; and information of a statusrepresenting a state such as a transmission-completed state, notransmission, transmission prohibition, or reception prohibition.

The partner device ID is actually represented by a hexadecimal numberlike a MAC address and is unique, and any other device does not have thesame opposing device ID. In addition, the partner device ID may be aunique ID that can specify a device called a UID in TransferJet, a useridentification ID of a higher level, a host device ID (serial number),or the like.

In addition, the update date and time is actually represented by thenumber of seconds of the coordinated universal time (UTC) or the likeand, here, is represented by date for easy understanding. Furthermore,while date information as update date and time is a date on which a fileis generated, there is also a method in which the date information ismanaged by each device as individual date. For example, date on which afile is generated by the device or date on which the file is copied in acase where the file is copied may be used.

The transmission prohibition, the reception prohibition, and the like ofthe status can be intentionally set by the user by using the partnerdevice ID or the like. A file of which the status is the transmissionprohibition is not set as a transmission target.

In the description presented above, while the transmission history listis configured as one file by dividing transmission histories intocategories of the transmission and the reception and listingtransmission histories until now for each partner device ID of eachcategory, such a configuration is an example, and the transmissionhistory list is not limited thereto. For example, there are severalpatterns including a pattern of a case where files are divided for eachpartner device ID, and transmission histories of the transmission andthe reception until now are formed for each file as a list and the like.

In each device, since each device can be identified based on the partnerdevice ID, histories of file transmission and file reception can bestored for a plurality of devices.

Subsequently, an operation of file transmission that is performed by thecommunication device 1 b will be described. Here, by using thetransmission device and the reception device illustrated in FIG. 20described first, a method of making a selection on the transmission sidewill be described. FIG. 26 is a flowchart that illustrates a filetransmission process according to this embodiment. More specifically, acase will be described in which a file is transmitted/received betweenthe transmission device and the reception device, and, thereafter, afile is added to the transmission device by performing photographingusing a digital camera or the like.

First, in the transmission device, the transmission history comparingunit 32 acquires an ID of a connected reception device (Step S601) andacquires a transmission history of the reception device (Step S602).Such information is included in a data frame transmitted from thereception device to the transmission device when the transmission deviceand the reception device are connected. In addition, among transmissionhistories acquired from the reception device, the transmission devicemay be configured to acquire not all the transmission histories but onlya history relating to the reception from the transmission device in thereception device.

In the transmission device, the transmission history comparing unit 32acquires transmission histories of the transmission device from thetransmission history storing unit 31 (Step S603). In addition, thetransmission history comparing unit 32 may be configured to acquire notall the histories but a transmission history relating to thetransmission from the transmission device corresponding to the receptiondevice as the transmission history.

In the transmission device, the transmission history comparing unit 32compares the acquired transmission history of the reception device witha transmission history corresponding to the reception device (receptiondevice ID) that is included in the transmission histories of thetransmission device (Step S604).

Since there is a file that has not been transmitted (Yes in Step S605),the transmission history comparing unit 32 sets a file having theno-transmission status in the transmission list table 16 as atransmission target file. Since there are files 7 to 10 as target filesthat have not been transmitted, the transmission history comparing unit32 sequentially sets the files starting from the file 7 in thetransmission list table 16 (Step S606).

Then, the communication control unit 14 transmits a file having theno-transmission status that has been set in the transmission list table16 to the reception device (Step S607).

In the transmission device, the transmission history storage processingunit 30, for a file that has been successfully transmitted to thereception device, updates the status field of the correspondingtransmission history list stored in the transmission history storingunit 31 as transmission-completed (Step S608).

In the transmission device, the process is returned to Step S604, and,in a case where there is a file that has not been transmitted, theprocess of Steps S604 to S608 is repeatedly performed. The transmissiondevice sequentially transmits files starting from the file 7 andrepeatedly performs the process until the file 10 is transmitted. Whenthe transmission of the file 10 is completed, since there is no filethat has not been transmitted (No in Step S605), the transmissionhistory comparing unit 32 ends the transmission process of the files.

In the transmission device, when a plurality of files are continuouslytransmitted, and the transmission history list is updated in the end bythe transmission history storage processing unit 30, in a case where thetransmission is interrupted due to power-off of the device or the likein the middle of the transmission, correct information does not remainin the transmission history list. Accordingly, the transmission historystorage processing unit 30, as described above, updates the transmissionhistory list every time when one file is successfully transmitted.

In addition, also in the reception device, after the reception of afile, the status filed of the corresponding transmission history liststored in the transmission history storing unit 31 is updated asreception-completed (Step S608).

FIG. 27 is a diagram that illustrates information that is transmittedand received between a transmission device and a reception device. Thetransmission device and the reception device transmit information of IDsthereof and transmission history lists of the devices to each other. Thetransmission device compares the transmission history lists thereof witheach other and transmits only files 7 to 10 of a difference. Then, eachof the transmission device and the reception device includes files 1 to10, and, by updating each of the transmission history lists thereof,there is no difference therebetween.

The method of making a selection on the transmission side has beenspecifically described, and an operation of making a selection on thereception side will be simply described. As can be acquired by referringto the flowchart illustrated in FIG. 26, the reception device performsprocesses that correspond to Steps S601 to S605. The reception deviceselects files that have not been transmitted in the processcorresponding to Step S606 and requests files desired to be receivedfrom the transmission device. The transmission device transmitstransmission files in Step S607. Then, in Step S608, the receptiondevice and the transmission device update status fields of thetransmission history lists stored in the transmission history storingunits 31 thereof. Also in this case, the reception device and thetransmission device can form the states similar to those according tothe method of making a selection on the transmission side.

As described in the first embodiment and the like, in the near fieldcommunication, as a trigger for transmission, a user's button operationor the like is not necessary, and, when there is a file that is atransmission target, the start time of a connection with the partnerdevice is triggered.

In addition, in each device (for example, a digital camera), there arecases where a file is newly added from a PC or the like through a filecopying process in addition to the transmission process from otherdevices described above. Accordingly, each device updates thetransmission history list before the start of a transmission process forthe other devices and adds a newly added file. At this time, the statusof the newly added file is no transmission.

Furthermore, in a case where a file is newly added from a PC or the likethrough a file copying process, a case may be considered in which an oldfile of the past is added. Also in such a case, since the old file ofthe past has not been transmitted to the partner device, the status isno transmission. Accordingly, the transmission history comparing unit 32also can set an old file of the past in the transmission list table 16as a transmission target file as a file having the no-transmissionstatus.

According to the sixth embodiment, in the communication device 1 b thatis a file transmission/reception device, the transmission device sideand the reception device side transmit/receive information of thetransmission histories thereof to/from each other, and the transmissiondevice transmits only files that have not been transmitted to thereception device. Alternatively, the reception device requests thetransmission device to transmit files that have not been received, andthe transmission device transmits the requested files. As a result, asituation can be avoided in which the same file is duplicatelytransmitted several times, and an advantage of improving thecommunication efficiency by shortening the time required for filetransmission can be acquired.

Seventh Embodiment

In the sixth embodiment, as the transmission history list stored in thetransmission history storing unit 31, as illustrated in FIGS. 24 and 25,the status is managed for each file for each partner device. However, ina case where the number of target files or target partner devices isincreased, the capacity of the transmission history storing unit 31 isincreased. In addition, the transmission history comparing unit 32 alsoneeds a high processing capability for file searching or the like. In adevice using the transmission history list, the speed for searching thetransmission history list depends on the processing capability of thehardware configuration of a central processing unit (CPU) and the likethat are mounted therein.

Accordingly, a plurality of management levels of the transmissionhistory list are prepared. The transmission history list described inthe sixth embodiment is set to have a high level, and, in thisembodiment, a case will be described in which a transmission historylist having a low management level lower than that of the transmissionhistory list described in the sixth embodiment is used.

The transmission history list of the high level is a case where theamount of managed information is large, and all the transmissionhistories of the past are formed and stored as a list as fileinformation (a file name, update date and time, a file size, a packet,and a status) of all the transmitted files, whereby a large amount ofdata is formed for each file transmission (see FIGS. 24 and 25). FIG. 28is a diagram that illustrates an example of the configuration of atransmission history list of a low level. The transmission history listof the low level is a case where the amount of managed information issmall, and, for example, only the information of a file transmitted lastis formed as a list as a transmission history and is stored in thetransmission history storing unit 31, whereby a large amount of data isnot formed. Accordingly, the management level can be properly useddepending on the processing capability of a device. A method of writingeach item (a partner device ID, update date and time, or the like) ofthe transmission history list of the low level is similar to that of thetransmission history list of the sixth embodiment (the high level).

Subsequently, an operation of transmitting a file that is performed bythe communication device 1 b of a case where the transmission historylist of the low level is used will be described. Here, the descriptionwill be presented using the transmission device illustrated in FIG. 20that has been described first. FIG. 29 is a flowchart that illustrates afile transmission process according to this embodiment.

First, in the transmission device, the transmission history comparingunit 32 acquires an ID of a connected reception device (Step S701). Theinformation of the ID is included in a data frame transmitted from thereception device to the transmission device when the transmission deviceand the reception device are connected together.

In the transmission device, the transmission history comparing unit 32acquires the transmission history of the device to which it belongs fromthe transmission history storing unit 31 (Step S702). Here, thetransmission history comparing unit 32 may be configured to acquire onlytransmission histories relating to the transmission of the device, towhich it belongs, corresponding to the reception device as thetransmission histories instead of all the transmission histories.

In the transmission device, the transmission history comparing unit 32arranges a group of files that are transmission targets in order ofoldest date to newest data, thereby generating a file list (Step S703).

In the transmission device, the transmission history comparing unit 32searches for a file that has not been transmitted from the file list(Step S704). More specifically, the transmission history comparing unit32 searches for a file that is the same as the file that has beensuccessfully transmitted last to a corresponding transmission device inthe transmission history from the file list in which files are listed inorder of oldest date to newest date. In a case where the same file ispresent, a next file of the same file and subsequent files are newfiles, in other words, files that have not been transmitted.

FIG. 30 is a diagram that illustrates a process of searching for filesthat have not been transmitted. In a file list, there are files 1 to 10that are arranged in order of oldest date to newest date. Thetransmission history comparing unit 32 compares the file, which has beensuccessfully transmitted last written in the transmission history withinformation of the file list in order from the file 1.

More specifically, the transmission history comparing unit 32 performs asearch for determining whether or not the same file as the file that hasbeen successfully transmitted last, which is written in the transmissionhistory, is present in the file list. Since the transmission devicetransmits files up to the file 6 at the time of the first transmission,here, matching occurs at the file 6. Accordingly, the transmissionhistory comparing unit 32 determines that the file 7 and subsequentfiles (files 7 to 10) are files that have not been transmitted (Yes inStep 3705). On the other hand, in a case where there is no matchingfile, since the transmission from the transmission device to thisreception device is new transmission, all the files have not beentransmitted, and thus, all the files are set as the transmissiontargets.

Since there are files that have not been transmitted (Yes in Step S705),the transmission history comparing unit 32 sets the files that have notbeen transmitted in the transmission list table 16 as transmissiontarget files. Since there are the files 7 to 10 as the target files thathave not been transmitted, the transmission history comparing unit 32sequentially sets files starting from the file 7 in the transmissionlist table 16 (Step S706).

Then, the communication control unit 14 transmits a file, which is setin the transmission list table 16, having the no-transmission status tothe reception device (Step S707).

In the transmission device, the transmission history storage processingunit 30 updates, for the reception device to which the file has beensuccessfully transmitted, file names included in the correspondingtransmission history list stored in the transmission history storingunit 31 and items such as update date and time and the like for the file(Step S708).

Similar to the sixth embodiment, in a case where a plurality of filesare continuously transmitted, the transmission history storageprocessing unit 30 repeatedly performs the process of Steps S704 toS708. The transmission device sequentially transmits the files in orderfrom the file 7 and repeats the process until the file 10 istransmitted. When the transmission of the file 10 is completed, there isno file that has not been transmitted (No in Step S705), andaccordingly, the transmission history comparing unit 32 ends the filetransmission process. The transmission device updates the transmissionhistory list every time when one file has been successfully transmitted.

According to the seventh embodiment, the communication device 1 b thatis a file transmission/reception device stores only information of afile that has been transmitted or received last as the transmissionhistory. As a result, compared to the sixth embodiment, the capacity ofthe transmission history storing unit 31 may be configured to be small,and the processing capability of the transmission history comparing unit32 may be configured to be low, whereby an advantage of realizing thedevice at low cost can be acquired.

Eighth Embodiment

In this embodiment, in a method of updating the transmission historylist of the low level, operations performed in various statuses in whichupdate is necessary will be described.

First, in a case where the transmission history list of the low level isused, a case will be described in which all files have been transmittedat the time of first transmission, thereafter, a file is added, andtransmission of the second time is performed.

FIG. 31 is a diagram that illustrates transitions of a file list and atransmission history list of each device. The configuration of eachdevice is similar to that of the sixth embodiment (see FIGS. 21 and 22).While devices A, B, and C illustrated in FIG. 31 can transmit andreceive files, here, the device A is assumed to be a transmissiondevice, and the device B is assumed to be a reception device. Inaddition, for the transmission history of each device, items necessaryfor description of this embodiment are extracted.

In the device A, the transmission history comparing unit 32 is connectedto the device B and acquires a partner device ID at the time of thefirst transmission. In the device A, since a device of which the“partner device ID” corresponds to the device B is not present in thecategory of the transmission of the transmission history list, thetransmission history comparing unit 32 performs control so as totransmit all the files (a) to (f) included in the file list at that timepoint.

In the device A, since all the files (a) to (f) have been successfullytransmitted to the device B, the transmission history storage processingunit 30 stores information of the ID (B) of the device B and the file(f) that has been successfully transmitted last in the transmissioncategory of the transmission history list stored in the transmissionhistory storing unit 31. At this time, since a file that has beeninterrupted in the middle of the transmission process is not present, inthe field of the packet that represents a successfully-received packet,a transmission result of “0” is stored.

In the device B, since the files (a) to (f) have been received from thedevice A, the transmission history storage processing unit 30 storesinformation of the ID (A) of the device A and the file (f) that has beensuccessfully transmitted last in the reception category of thetransmission history list stored in the transmission history storingunit 31. At this time, since a file that has been interrupted in themiddle of the transmission process is not present, a reception result of“0” is stored in the field of the packet.

Thereafter, four files (g) to (j) are assumed to be newly added to thedevice A. In the device A, in the second connection with the device B,“ID=B” is present in the transmission history list, and information ofthe file (f) is present as the information of thesuccessfully-transmitted file, and accordingly, the transmission isperformed starting from the next file (g). In the device A, when thetransmission is completed up to the file (j), in the transmissionhistory lists of the device A and the device B, information of the file(j) is stored as the information of the successfully-transmitted file.

Subsequently, in a case where the transmission history list of the lowlevel is used, a case will be described in which transmission isinterrupted due to a connection cut-off between devices in the middle ofthe transmission of the previous file at the time of the firsttransmission, and thereafter, retransmission is performed. In the caseillustrated in FIG. 31, the device B is assumed to be a transmissiondevice, and the device A is assumed to be a reception device.

In the device B, the transmission history comparing unit 32 is connectedto the device A and acquires a partner device ID at the firsttransmission process. In the device B, since a device of which the“partner device ID” corresponds to the device A is not present in thecategory of the transmission of the transmission history list, thetransmission history comparing unit 32 performs control so as totransmit all the files (a′) to (j′) included in the file list at thattime point.

While the device B attempts to transmit all the files (a′) to (j′) tothe device A, the transmission has been interrupted immediately aftersuccessful transmission of a file (b′). Accordingly, the transmissionhistory storage processing unit 30 stores information of the ID (A) ofthe device A and the file (b′) that has been successfully transmittedlast in the transmission category of the transmission history liststored in the transmission history storing unit 31. At this time, sincea file that has been interrupted in the middle of the transmissionprocess is not present, a transmission result of “0” is stored in thefield of the packet.

In the device A, since the files (a′) and (b′) have been received fromthe device B, the transmission history storage processing unit 30 storesinformation of the ID (B) of the device B and the file (b′) that hasbeen successfully transmitted last in the reception category of thetransmission history list stored in the transmission history storingunit 31. At this time, since a file that has been interrupted in themiddle of the transmission process is not present, a reception result of“0” is stored in the field of the packet.

Thereafter, when being reconnected to the device A, the device B resumesthe transmission of files. In the device B, since “ID=A” is present inthe transmission history list, and the information of the file (b′) ispresent as the information of the successfully-transmitted file,transmission is performed starting from the next file (c′). When thedevice B completes the transmission up to the file (j′), in thetransmission history lists of the device B and the device A, informationof the file (j′) is stored as the information of asuccessfully-transmitted file.

Subsequently, in the case where the transmission history list of the lowlevel is used, a case will be described in which transmission isinterrupted due to a connection cut-off between devices in the middle ofthe transmission of all files at the transmission of the first time, andthereafter, retransmission is performed in units of packets. In the caseillustrated in FIG. 31, a device A is assumed to be a transmissiondevice, and a device C is assumed to be a reception device.

In the device A, the transmission history comparing unit 32 is connectedto the device C and acquires a partner device ID at the time of thefirst transmission. In the device A, since a device of which the“partner device ID” corresponds to the device C is not present in thecategory of the transmission of the transmission history list, thetransmission history comparing unit 32 performs control so as totransmit all the files (a) to (j) included in the file list at that timepoint.

While the device A attempts to transmit all the files (a) to (j) to thedevice C, the transmission has been interrupted in the middle of thetransmission of the file (f). Accordingly, the transmission historystorage processing unit 30 stores information of the ID (C) of thedevice C and the file (e) that has been successfully transmitted last inthe transmission category of the transmission history list stored in thetransmission history storing unit 31. At this time, since a file thathas been interrupted in the middle of the transmission process ispresent, in the field of the packet, a transmission result of “30/100”(number of successful packets/total number of packets) is stored as aprocess history. Here, for example, the transmission is performed in theunit of one packet of 64 kB.

In the device C, since the files (a) to (e) have been received from thedevice A, the transmission history storage processing unit 30 storesinformation of the ID (A) of the device A and the file (e) that has beensuccessfully transmitted last in the reception category of thetransmission history list stored in the transmission history storingunit 31. At this time, since a file that has been interrupted in themiddle of the transmission process is present, a transmission result of“30/100” is stored in the field of the packet as a process history.

Thereafter, when being reconnected to the device C, the device A resumesthe transmission of files. In the device A, since “ID=C” is present inthe transmission history list, the information of the file (e) ispresent as the information of the successfully-transmitted file, and theinformation of “30/100” is present in the field of the packet as theprocess history, transmission is performed starting from the 31st packetof the next file (f). When the device A completes the transmission up tothe file (j), in the transmission history lists of the device A and thedevice C, information of the file (j) is stored as the information of asuccessfully-transmitted file.

FIG. 32 is a diagram that illustrates an example of the configuration ofthe file (j) that has been interrupted in the middle of the transmissionprocess. When the size of the file (f) is assumed to be 100 packets,since packets 1 to 30 have been successfully transmitted until theinterrupt time point, the device A starts transmission starting from apacket 31 after resuming the transmission process and transmits packets31 to 100.

In the device C, more specifically, the difference transmission controlunit 18 stores the packets 1 to 30 that have been successfully receiveduntil the middle of interruption in the packet storing unit 33, and therestoration processing unit 34 restores the packet (f) by combining thepackets 1 to 30 stored in the packet storing unit 33 and packets 31 to100 after the resuming of the transmission process together.

Subsequently, in the device of the transmission device or the receptiondevice, when the power is turned off before the completion of the updateof the transmission history of the file transmission, the transmissionhistories do not match each other on the transmission device side andthe reception device side. Here, a recovery method for matching thetransmission histories by updating the transmission history of one sidein a case where the transmission histories of the transmission deviceand the reception device do not match each other will be described. Inthe case illustrated in FIG. 31, the device B is assumed to be atransmission device, and the device C is assumed to be a receptiondevice.

In the device B, the transmission history comparing unit 32 is connectedto the device C and acquires a partner device ID at the time of thefirst transmission. In the device B, since a device of which the“partner device ID” corresponds to the device C is not present in thecategory of the transmission of the transmission history list, thetransmission history comparing unit 32 performs control so as totransmit all the files (a′) to (j′) included in the file list at thattime point. At this time, in the device B, the transmission historystorage processing unit 30 updates the information ofsuccessfully-transmitted files in the transmission history file storedin the transmission history storing unit 31 every time when a file istransmitted one by one.

In the device C, when the files (a′) to (j′) are received from thedevice B, the transmission history storage processing unit 30 storesinformation of the ID (B) of the device B and the file that has beensuccessfully transmitted last in the reception category of thetransmission history list stored in the transmission history storingunit 31. At this time, in the device C, every time when the transmissionhistory storage processing unit 30 receives a file one by one, theinformation of files that have been successfully received is updated inthe transmission history file stored in the transmission history storingunit 31.

When the device B successfully transmits the last file (j′), in thetransmission history list, the transmission of the file (j′) is recordedas the history of the device C. Here, on the device C side, after thelast file (j′) is received, the power of the device is assumed to beturned off during the update (before completion) of the transmissionhistory file. In such a case, in the device C, in the transmissionhistory list, not the last file (j′) but the previous file (i′) isrecorded in a reception record from the device B. Accordingly, in thedevices B and C, the transmission histories thereof do not match eachother.

In such a case, the devices B and C recognize that the transmissionhistories thereof do not match each when the devices are connected againand exchange the transmission histories thereof. The device C performs asearch for determining whether or not the file (j′) is present based onthe information of the transmission history that is acquired from thedevice B. In a case where a corresponding file has been found, thedevice C regards that the file (j′) has already been received andupdates the last-received-file included in the transmission history fromthe file (i′) to the file (j′). In this way, the transmission historieson both sides match each other.

According to the eighth embodiment, in the communication device 1 b thatis a file transmission/reception device, in a case where thetransmission history of the low level is used, an item for the opposingdevice is added to the transmission history list at the time oftransmitting/receiving a file for the first time. However, thereafter,when a file is transmitted/received to/from the opposing device that hasalready transmitted or received the file for the second time orsubsequent times, the amount of information stored in the transmissionhistory list for the transmission/reception of the file is notincreased, but the transmission/reception can be responded by updatingonly the histories of the communication device and the opposing device.As a result, in a case where the transmission history of the low levelis used, since detailed information of a file that is newly transmittedand received does not need to be stored, an advantage of performingupdating through a simple process can be acquired in a case where aninterrupt occurs in the middle of the transmission process or even in acase where an irregular situation such as a situation, in which thetransmission histories of the communication device side and the partnerside do not match each other, occurs.

Ninth Embodiment

In the sixth to eighth embodiments, while the communication device 1 b,which is illustrated in FIG. 21, corresponding to the first to thirdembodiments has been described, the method of using the transmissionhistory may be also used for the communication device of the removabledevice described in the fourth and fifth embodiments.

FIG. 33 is a diagram that illustrates an example of the configuration ofa communication device 1 c and a host device 2 according to thisembodiment. The communication device 1 c includes: an application unit11; a communication direction managing unit 12; a transmission conditioninformation managing unit 13; a communication control unit 14; aconnection partner management table 15; a transmission list table 16; ahost device I/F unit 17; and a difference transmission control unit 18a.

FIG. 34 is a diagram that illustrates an example of the configuration ofthe difference transmission control unit 18 a according to thisembodiment. The difference transmission control unit 18 a includes: atransmission history storage processing unit 30; a transmission historystoring unit 31; a transmission history comparing unit 32; a packetstoring unit 33; a restoration processing unit 34; a register unit 35;and a register managing unit 36. The register unit 35 is a register thatcan be used by both the communication device 1 c and the host device 2.The register managing unit 36 performs a process of reading/writing datafrom/into the register unit 35.

FIG. 35 is a simplified diagram of the configuration of thecommunication device 1 b. For easy comparison with FIGS. 36 and 37 to bedescribed later, FIG. 35 illustrates the configuration illustrated inFIG. 21 as a communication unit, a memory in which transmission historylists are stored, and the other configuration as a system. In FIG. 35,the communication unit corresponds to the communication directionmanaging unit 12 to the transmission list table 16 illustrated in FIG.21, the memory corresponds to the transmission history storing unit 31,and the system corresponds to the user I/F unit 10, the application unit11, the transmission history storage processing unit 30, and thetransmission history comparing unit 32 to the restoration processingunit 34. In the configuration illustrated in FIG. 35, the filetransmission/reception devices are configured as one device, and thedevice serves as a host device.

FIGS. 36 and 37 are simplified diagrams of the configurations of thecommunication device 1 c and the host device 2. FIGS. 36 and 37 aresimplified diagrams of the configuration of the communication device 1 cand the host device 2 illustrated in FIG. 33. In the configurationillustrated in FIG. 36, a communication unit corresponds to thecommunication direction managing unit 12 to the transmission list table16 illustrated in FIG. 33, a memory of the host device 2 corresponds tothe transmission history storing unit 31, a memory of the communicationdevice 1 c side corresponds to the transmission history storing unit 31,a system of the host device 2 corresponds to the user I/F unit 10, thedevice information managing unit 20, and the communication device I/Funit 21 illustrated in FIG. 33, and a system of the communication device1 c side corresponds to the application unit 11, the host device I/Funit 17, the transmission history storage processing unit 30, and thetransmission history comparing unit 32 to the register managing unit 36.

In the configuration illustrated in FIG. 37, there is a difference inthat the transmission history storing unit 31 is not included in thememory of the host device 2. In other words, FIG. 36 illustrates a casewhere the transmission history list is stored in both the memorydisposed on the host device 2 side and the memory of the communicationdevice 1 c. In addition, FIG. 37 illustrates a case where thetransmission history list is stored only in the memory of thecommunication device 1 c.

As illustrated in FIGS. 35 and 37, in the case where the transmissionhistory list is stored only in the communication device 1 b or only inthe communication device 1 c that is a removable device, there is nodifference in the transmission history lists. In contrast to this, asillustrated in FIG. 36, in the case where the transmission history listis stored in both the host device 2 and the communication device 1 c,and the communication device 1 c is inserted into the host device 2,there is a concern that a difference occurs between two transmissionhistory lists. Accordingly, the communication device 1 c and the hostdevice 2 synchronize the transmission history lists through bothsystems. At this time, in a case where there is a difference between thetransmission history lists, the transmission history lists aresynchronized to the transmission history list having a higher prioritylevel.

As a method of synchronizing the transmission history lists of thecommunication device 1 c and the host device 2, for example, there is amethod in which the transmission history storage processing unit 30 orthe transmission history comparing unit 32 of the differencetransmission control unit 18 a acquires information of the transmissionhistory list of the host device 2 side through the host device I/F unit17 and the communication device I/F unit 21, compares the acquiredtransmission history list with the content of the transmission historylist stored in the transmission history storing unit 31, and changes thecontent of the transmission history list stored in the transmissionhistory storing unit 31, or notifies the host device 2 of a change inthe content of the transmission history list, but the method is notlimited thereto.

According to the ninth embodiment, the communication device 1 c that isa removable device and the host device 2 are connected to each other,and, in a case where the information of the transmission history list isstored on both sides, the transmission history lists are synchronized toeach other between the communication device 1 c and the host device 2.As a result, a difference between the transmission history lists of thecommunication device 1 c and the host device 2 can be eliminated, and,also in a case where a file is transmitted/received to/from any othercommunication device, similar to the communication device 1 b, anadvantage of managing files based on the transmission history list canbe acquired.

Tenth Embodiment

In this embodiment, similar to the ninth embodiment, in a case where thecommunication device 1 c and the host device 2 are connected to eachother, a case will be described in which register information storedinside the communication device 1 c is used separately by software ofthe communication device 1 c and software of the host device 2.

FIG. 38 is a diagram that illustrates register use states of thecommunication device 1 c and the host device 2. In the host device 2(for example, a digital camera or the like) and the communication device1 c that is a medium, it is assumed that a register (register unit 35)and software Y using information of the register are arranged in themedium of the communication device 1 c, and another software X using theinformation of the register (register unit 35) is arranged in the hostdevice 2.

In parts of the register (register unit 35), areas for storing file sizeinformation of a file that is in the middle of the transmission processand file size information corresponding to a transmitted portion of afile that is in the middle of the transmission are arranged. FIG. 39 isa diagram that illustrates an example of the configuration of a registermap. In FIG. 39, parts of “File Size” and “Transferred File Size”correspond to the “file size” and the “file size corresponding to thetransmitted portion” of the register map illustrated in FIG. 38.

When a file is transmitted or received, the software Y of thecommunication device 1 c stores the file size information of the filethat is in the middle of the transmission process and the file sizecorresponding to a transmitted portion in the register. Until thetransmission/reception is completed, this process is regularly performedseveral times, and, in a case where the file size is large, the numberof times that the process is performed is increased. More specifically,in the difference transmission control unit 18 a, the register managingunit 36 updates “File Size” and “Transferred File Size” stored in theregister unit 35 (register).

The host device 2 acquires the register information during thetransmission/reception process, thereby determining how much portion hasbeen transmitted and received with respect to the file size of the filethat is in the middle of the transmission process. The host device 2 cannotify the user of the degree of progress of the transmission byperforming a GUI display or the like.

In other words, while the software X of the host device 2 side cannotacquire directly the progress status of the file that is in the middleof the transmission of other software (in this case, the software Yarranged inside the communication device 1 c), the software X canacquire the progress status of the file that is in the middle of thetransmission process from the register information stored in thecommunication device 1 c.

According to the tenth embodiment, the communication device 1 c includesa register, and, in a case where both the software of the communicationdevice 1 c and the software of the host device 2 use the register, “FileSize” and “Transferred File Size” of the register are updated on thecommunication device 1 c side. As a result, on the host device 2 side,by referring to the register information stored in the communicationdevice 1 c, the communication device 1 c can acquire the progress statusof a file that is in the middle of the transmission process, which isacquired as an advantage.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

1-20. (canceled) 21: A SD card which is connectable to a host device andis able to communicate with a first device having a connection partnermanaging table and a transmission list table, comprising: a host deviceI/F that is connectable to the host device; and a transmission conditioninformation managing unit that acquires information of the host devicethrough the host device I/F and stores the acquired information as atransmission condition information, wherein when a connection betweenthe first device and the SD card is established, the transmissioncondition information of the host device in the transmission conditioninformation managing unit is sent to the first device upon a requestfrom the first device, and if the acquired information of the hostdevice is included in the connection partner managing table, thetransmission condition information managing unit transmits filesdesignated by the transmission list table to the host device. 22: The SDcard according to claim 21, wherein if the acquired information of thehost device is not included in the connection partner managing table,the transmission condition information managing unit regards the hostdevice as a guest and transmits files designated as a guest by thetransmission list table to the host device. 23: The SD card according toclaim 21, further comprising: a communication control unit that, if innear field communication a conflict occurs in a connection at a secondcommunication layer higher than a first communication layer with a firstdevice, cuts off the connection at the second communication layer withthe first device; a communication direction managing unit that decides amode of the file transmission/reception device when performing are-connection at the second communication layer via the connection atthe first communication layer with the first device as any one mode of amaster mode or a slave mode, and switches the SD card to the decidedmode; and an application unit that performs transmission, reception, ortransmission/reception of a file with the first device and the SD cardin the decided mode, wherein the communication direction managing unitdetermines whether the first device is compliant with a bidirectionalcommunication operation, if the first device is compliant with thebidirectional communication operation, the communication directionmanaging unit decides the mode such that the SD card performs abidirectional communication process, if the first device is notcompliant with the bidirectional communication operation, thecommunication direction managing unit decides the mode such that the SDcard performs an unidirectional communication process. 24: The SD cardaccording to claim 21, wherein the connection partner managing table isa table in which identification information of a device relates totransmission condition information of a device and attribute informationof a device with respect a plurality of candidate device; and thetransmission list table is a table in which identification informationof file to be transmitted relates to attribute information of a devicewith respect to a plurality of candidate files. 25: The SD cardaccording to claim 21, wherein the acquired information of the hostdevice includes at least one of: a serial number, a user name, a devicetype. 26: The SD card according to claim 21, wherein the SD card isconnectable to a plural host devices and is able to communicate with afirst device including a connection partner managing table and atransmission list table, the transmission condition information managingunit may acquire respective information of the host devices connectedthrough the host device I/F and may store the acquired information ofrespective transmission condition information in the connection partnermanaging table. 27: The SD card according to claim 21, wherein the SDcard is connectable to a plural host devices and is able to communicatewith a first device including a connection partner managing table and atransmission list table, the transmission condition information managingunit may acquire respective information of the host devices connectedthrough the host device I/F and may store the acquired information ofrespective transmission condition information in the transmission listtable. 28: The SD card according to claim 23, wherein the communicationdirection managing unit determines whether the first device is compliantwith the bidirectional communication operation, based on specificationinformation of the first device acquired via the connection at the firstcommunication layer from the first device after the occurrence of theconflict. 29: The SD card according to claim 23, wherein if the firstdevice is compliant with the bidirectional communication operation, thecommunication direction managing unit acquires identificationinformation used for identifying the first device via the connection atthe first communication layer from the first device after occurrence ofthe conflict, the communication control unit cuts off the connection atthe second communication layer, and the communication direction managingunit decides the mode of the file transmission/reception device whenperforming the re-connection based on a result of a comparison betweenthe identification information of the first device and identificationinformation of the file transmission/reception device. 30: The SD cardaccording to claim 23, wherein if the first device is compliant with thebidirectional communication operation, the communication directionmanaging unit, after the cut-off of the connection at the secondcommunication layer with the first device, switches the mode of the filetransmission/reception device when performing the re-connection to theslave mode and, in a case that a connection request is not received fromthe first device, switches to the master mode the mode of the filetransmission/reception device after a predetermined time has elapsed.31: The SD card according to claim 23, wherein the communicationdirection managing unit acquires identification information used foridentifying the first device via the connection at the firstcommunication layer from the first device after occurrence of theconflict, and the communication control unit cuts off the connection atthe second communication layer, the communication direction managingunit acquires again the identification information via the connection atthe first communication layer from the first device in a process ofperforming the re-connection at the second communication layer, and thecommunication control unit notifies the application unit with connectionestablishment in a case that the acquired identification informationmatches the identification information of the filetransmission/reception device. 32: The SD card according to claim 23,wherein if the first device is compliant with the bidirectionalcommunication operation, the communication direction managing unit,after the application unit completes a process of one mode of the mastermode and the slave mode, performs control of switching to the othermode. 33: The SD card according to claim 23, wherein, if the firstdevice is not compliant with the bidirectional communication operation,the communication direction managing unit switches to the slave mode themode of the file transmission/reception device when performing there-connection. 34: The SD card according to claim 33, wherein if thefirst device is compliant with the bidirectional communication operationand the SD card is in the master mode, the communication control unitperforms control of cutting off the connection at the secondcommunication layer with the first device after the application unitcompletes the process of master mode. 35: The SD card according to claim23, wherein, if the first device is not compliant with the bidirectionalcommunication operation, the communication direction managing unitswitches to the slave mode the mode of the file transmission/receptiondevice when performing the reconnection at the second communicationlayer. 36: The SD card according to claim 23, further comprising: atransmission history storage processing unit that generates atransmission history list including identification information of thefirst device and information of transmitted files and received files;and a transmission history comparing unit that sets files that have notbeen transmitted to the first device as transmission target files basedon a result of a comparison between the transmission history list, whichis generated by the first device, acquired via the connection at thefirst communication layer from the first device and a transmissionhistory list of the SD card. 37: The SD card according to claim 23,further comprising: a transmission history storage processing unit thatgenerates a transmission history list including identificationinformation of the first device and information of transmitted files andreceived files; and a transmission history comparing unit that requeststhe first device to transmit files that have not been received by the SDcard based on a result of a comparison between a transmission historylist, which is generated by the first device, acquired via theconnection at the first communication layer from the first device andthe transmission history list of the SD card. 38: The SD card accordingto claim 37, further comprising: a packet storing unit that storespackets configuring a file acquired via the connection at the firstcommunication layer from the first device through a plurality of timesof file reception; and a restoration processing unit that restores thefile from the packets stored in the packet storing unit, wherein thetransmission history storage processing unit records, in thetransmission history list, information of packets that have beensuccessfully transmitted or received among the packets configuring thefile in the transmission history list. 39: The SD card according toclaim 37, wherein the transmission history comparing unit, after theconnection establishment with the first device, acquires thetransmission history list, which is generated by the first device, viathe connection at the first communication layer from the first device.40: The SD card according to claim 37, further comprising: a registerunit that is usable for the host device; and a register managing unitthat stores, in the register unit, information of a file size of a filethat is in the middle of transmission or reception and a file size of afile of which transmission or reception has been completed.